<?php 
	$images = $dataObj->GetInformation();
	$user = $dataObj->GetUser();
	
	if($user != null && $user->GetRank() > 0)
	{
		// Config
		$browseAttributes = array(
			'name' => "userfile");
	
		$submitAttributes = array(
			"id"	=> "submitUpload",
			"name"	=> "submitUpload",
			"value" => "Upload");
		
		// Errors
		if($dataObj->GetError() != null)
		{
			echo 
			"<div class='validation'>"
				. $dataObj->GetError() .
			"</div>";
		}
		
		// Print
		echo 
			form_open_multipart(current_url())
				. form_upload($browseAttributes)
				. form_submit($submitAttributes) .
			form_close();		
	}
	
	if(isset($images) && $images != null)
	{
		$imgArray;
		$rowCount = 0;
		$imgWrapper = 
		"<div id='galleryWrapper'>";
			foreach($images as $image)
			{
				$imgWrapper .= 
				"<a href='javascript:void(0)' onclick=\"showLarge('".base_url()."/uploads/".$image['fileName']."');\">
				<img class='thumbs' src='".base_url()."/uploads/".$image['fileName']."' alt='".$image['fileName']."'/></a>";
			}
		$imgWrapper .= 
		"</div>";
		echo $imgWrapper;
	}
	else
	{
		echo "No images in gallery";
	}

       